const load = (link, call = null) => {
    return new Promise((resolve, reject) => {
        try{
            const isCss = link.endsWith('.css');
            const dEl = document.createElement(isCss?'link':'script');
            if(isCss){
                dEl.rel = 'stylesheet';
                dEl.href = link;
            }else{
                dEl.async = false;
                dEl.src = link;
            }
            dEl.onload = function(){
                resolve(true);
            }
            document.getElementsByTagName('body')[0].appendChild(dEl);
        }catch(err){
            reject(err);
        }
    });
}